home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / xgakit.exe / XGAKIT.DOC < prev    next >
Text File  |  1991-05-06  |  6KB  |  126 lines

  1.  
  2.                XGA Programmer's toolkit - version 1.1
  3.  
  4. (Version 1.1 includes several 800x600 modes that were not in
  5. the original release.  The 800x600 modes require a multisynch
  6. adapter.)
  7.  
  8. This package contains a set of simple routines providing direct-video
  9. access to IBM's new XGA adapter.  These routines have been tested on
  10. both single-monitor and dual-monitor (XGA & VGA) setups.  If you have
  11. multiple XGA adapter/monitors (and you can have up to eight of them!),
  12. you'll have to modify these routines yourself - I ran out of money after
  13. buying one XGA adapter <grin>.
  14.  
  15. The routines and detailed explanations of their operation are in
  16. XGAKIT.ASM, an assembly module written to interface with a driving
  17. "C" program using the medium model.  There is also a simple XGADEMO.C
  18. program provided as proof that these routines work (XGADEMO was also an
  19. invaluable tool for me in *getting* them to work, which is why the
  20. commented-out function calls in it exist).
  21.  
  22. Basically, the routines provide functions for throwing an XGA adapter
  23. into any of the modes listed below.  For the graphics modes, there are
  24. also routines for setting the XGA palette (which is *different* from the
  25. VGA palette), writing/reading individual pixels, and writing/reading
  26. entire (or portions of) individual scan lines.  The routines use the
  27. 64K aperture of the XGA as opposed to its 1MB or 4MB aperture, so they're
  28. not as fast as they could be - but they work, and they're relatively
  29. simple.
  30.  
  31. The XGA video modes supported by these routines are:
  32.  
  33.              normal VGA text mode
  34.              132-col VGA text mode
  35.              1024x768x256 graphics mode
  36.              1024x768x16 graphics mode
  37.              640x480x256 graphics mode
  38.              640x480x65536 graphics mode
  39.              800x600x16 graphics mode       |  The 800x600 modes require
  40.              800x600x256 graphics mode      |  a multisynch monitor (they've
  41.         *    800x600x65536 graphics mode    |  been tested on a NEC 2A)
  42.          
  43.  * - but the 800x600x65536 mode doesn't work on the 2A.  The pixels are
  44.      doubled up hirozontally so that only the left-hand side of the
  45.      screen is visible.  No, I don't know why.  Help!
  46.  
  47.                     
  48. ---------------------
  49.  
  50. The limitations (of both the XGA adapter and this code):
  51.  
  52. - Although the XGA adapter works just fine as a VGA adapter when it is in
  53. a VGA mode (which it can do on single-mode setups), it has a few uglies
  54. when it is in one of its extended modes.
  55.  
  56. For one, you can't get an XGA adapter back into a VGA mode just by
  57. calling a BIOS INT 10H routine, because the (current) PS/2 BIOS doesn't
  58. know about the XGA's special registers and so can't reset them - you have
  59. to invoke 'xga_mode(0)' first to get the adapter(s) back into a "normal"
  60. VGA mode.  On dual-adapter setups, 'xga_mode(0)' leaves the XGA image
  61. intact but switches the focus back to the VGA monitor.
  62.  
  63. For another, when it is in an extended mode, the XGA uses its own
  64. palette registers, which are *different* from those of the VGA.  They are
  65. accessed differently (use 'xga_setpalette()'), they are *not* initialized
  66. to the VGA palette (you have to set them explicitly), and they use the
  67. *top* six bits of a byte instead of the *bottom* six bits (IE, RGB value
  68. 10,20,30 in VGA mode is the same as color 40,80,120 in extended mode).
  69. 'xga_setpalette()' uses XGA-style values - 0 thru 255.
  70.  
  71. Also, the (current) Windows drivers that are distributed with the XGA
  72. prevent the XGA routines from working properly, probably because the
  73. XGA register locations are not virtualized.  The monitor ID is returned
  74. as an invalid '0000', the memory-detect routines do not work, and
  75. everything else is equally messed up.  For the moment, if 'xga_detect()'
  76. receives that impossible '0000' monitor ID, it just returns a "no XGA
  77. found" and inhibits the other routines from doing anything. 
  78.  
  79.  
  80.          ----------------end-of-author's-documentation---------------
  81.  
  82.                          Software Library Information:
  83.  
  84.                     This disk copy provided as a service of
  85.  
  86.                            Public (software) Library
  87.  
  88.          We are not the authors of this program, nor are we associated
  89.          with the author in any way other than as a distributor of the
  90.          program in accordance with the author's terms of distribution.
  91.  
  92.          Please direct shareware payments and specific questions about
  93.          this program to the author of the program, whose name appears
  94.          elsewhere in  this documentation. If you have trouble getting
  95.          in touch with the author,  we will do whatever we can to help
  96.          you with your questions. All programs have been tested and do
  97.          run.  To report problems,  please use the form that is in the
  98.          file PROBLEM.DOC on many of our disks or in other written for-
  99.          mat with screen printouts, if possible.  PsL cannot debug pro-
  100.          programs over the telephone, though we can answer questions.
  101.  
  102.          Disks in the PsL are updated  monthly,  so if you did not get
  103.          this disk directly from the PsL, you should be aware that the
  104.          files in this set may no longer be the current versions. Also,
  105.          if you got this disk from another vendor and are having prob-
  106.          lems,  be aware that  some files may have become corrupted or
  107.          lost by that vendor. Get a current, working disk from PsL.
  108.  
  109.          For a copy of the latest monthly software library newsletter
  110.          and a list of the 3,000+ disks in the library, call or write
  111.  
  112.                            Public (software) Library
  113.                                P.O.Box 35705 - F
  114.                             Houston, TX 77235-5705
  115.  
  116.                                 1-800-2424-PSL
  117.                              MC/Visa/AmEx/Discover
  118.  
  119.                           Outside of U.S. or in Texas
  120.                           or for general information,
  121.                               Call 1-713-524-6394
  122.  
  123.                           PsL also has an outstanding
  124.                           catalog for the Macintosh.
  125.  
  126.